/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Utilities;

import javax.swing.table.DefaultTableModel;

/**
 *
 * @author HINSKY
 */
public class MyLibrary {

    public static void clearAllRow(DefaultTableModel tableModel) throws Exception {
        for (int i = tableModel.getRowCount() - 1; i >= 0; i--) {
            tableModel.removeRow(i);
        }
    }

    public static boolean checkIntNumber(String s) {
        {
            try {
            int a = Integer.parseInt(s);
            return true;
        } catch (Exception e) {
        }
        return false;
        }

    }

    public static boolean checkDoubleNumber(String s) {
        try {
            double a = Double.parseDouble(s);
            return true;
        } catch (Exception e) {
        }
        return false;
    }
}
